//
//  UserMsg.swift
//  flowerpot
//
//  Created by fyname on 16/1/21.
//  Copyright © 2016年 senhe. All rights reserved.
//

import Foundation

var umDict = Dictionary<String, String>()

class UserMsg: NSObject {
    
    static func setUserContent(userStatusDO:UserMsgDO){
        umDict[userStatusDO.userId!] = userStatusDO.userContent
    }
    
    static func getUserContent(userId:String)->UserMsgDO{
        let userStatusDO = UserMsgDO()
        for (key , value) in umDict
        {
            print("value=:\(key)")
            if(key == userId){
                userStatusDO.userId = key
                userStatusDO.userContent = value
            }
        }
        
        return userStatusDO
    }

    static func getUserConentCount()->Int{
        let count = umDict.count
        return count
    }
}